<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body></body>
</html>
<script>
    const regx1 = /\d+/g;
    const regx2 = /\D+/g;
    const str = "abc1234def56789ghl";
    const result1 = str.match(regx1); // ['1234', '56789']
    const result2 = str.match(regx2); // ['abc', 'def', 'ghl']
    console.log(result1, result2);
</script>
